package com.sylar.happygps;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MettingActivity extends Activity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.metting);

		TextView tv_title_name = (TextView) findViewById(R.id.tv_title_name);
		tv_title_name.setText("约会地选择方式");
		Button btn_title_left = (Button) findViewById(R.id.btn_title_left);
		btn_title_left.setVisibility(View.VISIBLE);
		btn_title_left.setOnClickListener(this);

		Button btn_to_loc_mett = (Button) findViewById(R.id.btn_to_loc_mett);
		btn_to_loc_mett.setOnClickListener(this);
		Button btn_to_map_mett = (Button) findViewById(R.id.btn_to_map_mett);
		btn_to_map_mett.setOnClickListener(this);
		Button btn_to_fac_mett = (Button) findViewById(R.id.btn_to_fac_mett);
		btn_to_fac_mett.setOnClickListener(this);
		Button btn_to_net_mett = (Button) findViewById(R.id.btn_to_net_mett);
		btn_to_net_mett.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_title_left:
			finish();
			break;
		case R.id.btn_to_loc_mett:
			to_loc_mett();
			break;
		case R.id.btn_to_map_mett:
			to_map_mett();
			break;
		case R.id.btn_to_fac_mett:
			to_fac_mett();
			break;
		case R.id.btn_to_net_mett:
			to_net_mett();
			break;
		}
	}
	
	//以当前位置点作为约会地点
	private void to_loc_mett(){
		Intent intent = new Intent(this,ChooseMapTypeActivity.class);
		startActivity(intent);
	}
	
	//在地图上选择约会地点
	private void to_map_mett(){
		Intent intent = new Intent(this,ChooseMapTypeActivity.class);
		startActivity(intent);
	}
	
	//从收藏中选择约会地点
	private void to_fac_mett(){
		Intent intent = new Intent(this,FaviNavActivity.class);
		startActivity(intent);
	}
	
	//从网上搜索约会点数据
	private void to_net_mett(){
		Intent intent = new Intent(this,FaviNavActivity.class);
		startActivity(intent);
	}
	
}
